package com.windaka.elements.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;


/**
 * 密码加密器
 * @author song
 * @date 3:06 下午 2021/11/9
 * @param 
 * @return 
 * @other
**/
@Configuration
public class PasswordEncoderConfig {

    /**
     * 默认的加密器不够安全 这里使用了 BCryptPasswordEncoder 加密
     * @author song
     * @date 2:33 下午 2021/11/16
     * @param
     * @return
     * @other
    **/
    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
}
